//
//  XDTextFieldTableViewCell.m
//  AirConditioningMaintenance
//
//  Created by iCode on 16/9/13.
//  Copyright © 2016年 iCode. All rights reserved.
//

#import "XDTextFieldTableViewCell.h"
#import "Masonry.h"

@implementation XDTextFieldTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (instancetype) initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self initSubView];
        
    }
    return self;
}

- (void)initSubView
{
    self.backgroundColor = [UIColor whiteColor];
    
    _textField = [[UITextField alloc]init];
    _textField.returnKeyType = UIReturnKeyDone;
    _textField.textColor = [UIColor colorWithRed:38.0/255.0 green:39.0/255.0 blue:40.0/255.0 alpha:1];
    _textField.secureTextEntry = YES;
    
    _textField.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_textField];
    
    [_textField mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.contentView.mas_top).with.offset(0);
        make.left.equalTo(self.contentView.mas_left).with.offset(15);
        make.right.equalTo(self.contentView.mas_right).with.offset(-15);
        make.bottom.equalTo(self.contentView.mas_bottom).with.offset(0);
        
    }];
}

@end
